import MyIterator.*;
import MyObjectList.AbstractItemList;
import MyObjectList.ItemList;

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<String> items = new ArrayList<>();
        items.add("A");
        items.add("B");
        items.add("C");
        items.add("D");
        items.add("E");

        ItemList itemList = new ItemList(items);
        MyIterator iterator = new ItemIterator(itemList);

        iterator.movePrevious();
        System.out.println(iterator.fetchPreviousItem());
        System.out.println(iterator.fetchNextItem());
    }
}
